<?php $this->registerJsFile('@web/home/user/js/jquery.min.js',['depends'=>['app\assets\AppAsset']]);?>
<div class="tpl-content-wrapper">
    <div class="tpl-content-page-title">
        收件箱
    </div>
    <ol class="am-breadcrumb">
        <li><a href="<?php echo \yii\helpers\Url::toRoute(['index/index']) ?>" class="am-icon-home">首页</a></li>
        <li><a href="<?php echo \yii\helpers\Url::toRoute(['user/index']) ?>">后台</a></li>
        <li class="am-active">收件箱</li>
    </ol>
    <div class="tpl-portlet-components">
        <div class="portlet-title">
            <div class="caption font-green bold">
                <span class="am-icon-code"></span> 收件箱
            </div>
            <div class="tpl-portlet-input tpl-fz-ml">
                <div class="portlet-input input-small input-inline">
                    <div class="input-icon right">
                        <i class="am-icon-search"></i>
                        <input type="text" class="form-control form-control-solid" placeholder="搜索..."></div>
                </div>
            </div>


        </div>
        <div class="tpl-block">
            <div class="am-g">
                <div class="am-u-sm-12 am-u-md-6">
                    <div class="am-btn-toolbar">
                        <div class="am-btn-group am-btn-group-xs">
                            <a href="<?php echo \yii\helpers\Url::toRoute(['user/message','kind'=>1]);?>">
                                <button type="button" class="am-btn am-btn-default am-btn-secondary"><span
                                            class="am-icon-save"></span> 标记所有为已读
                                </button>
                            </a>
                            <a href="<?php echo \yii\helpers\Url::toRoute(['user/message','kind'=>2]);?>">
                                <button type="button" class="am-btn am-btn-default am-btn-danger"><span
                                            class="am-icon-trash-o"></span> 删除所有
                                </button>
                            </a>
                        </div>
                    </div>
                </div>

            </div>
            <div class="am-g">
                <div class="tpl-table-images">
                    <?php foreach ($message as $data):?>
                    <div class="am-u-sm-12 am-u-md-6 am-u-lg-4">
                        <div class="tpl-table-images-content">
                            <div class="tpl-table-images-content-i-time">收到时间：<?php echo date('Y-m-d H:i:s',$data->times);?></div>
                            <div class="tpl-i-title">
                                <?php echo $data->title;?>
                                <?php if($data->is_read==0){
                                    echo "<span class=\"tpl-label-info\">新信息</span>";
                                }else{
                                    echo "<span class=\"tpl-label-read\">已读</span>";
                                }?>
                            </div>
                            <div class="tpl-table-images-content-block">
                                <div class="tpl-i-font">
                                    <?php echo $data->content;?>
                                </div>
                            </div>
                        </div>
                    </div>
                    <?php endforeach;?>

<!--                    <div class="am-u-lg-12">-->
<!--                        <div class="am-cf">-->
<!---->
<!--                            <div class="am-fr">-->
<!--                                <ul class="am-pagination tpl-pagination">-->
<!--                                    <li class="am-disabled"><a href="#">«</a></li>-->
<!--                                    <li class="am-active"><a href="#">1</a></li>-->
<!--                                    <li><a href="#">2</a></li>-->
<!--                                    <li><a href="#">3</a></li>-->
<!--                                    <li><a href="#">4</a></li>-->
<!--                                    <li><a href="#">5</a></li>-->
<!--                                    <li><a href="#">»</a></li>-->
<!--                                </ul>-->
<!--                            </div>-->
<!--                        </div>-->
<!--                        <hr>-->
<!--                    </div>-->

                </div>

            </div>
        </div>
        <div class="tpl-alert"></div>
    </div>
</div>